//
//  LiquorMarketController.m
//  LiquorChain
//
//  Created by apple on 2019/1/7.
//  Copyright © 2019年 王冬. All rights reserved.
//

#import "LiquorMarketController.h"
#import "WalletViewCell.h"
@interface LiquorMarketController ()<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic,strong)UITableView *tableView;

@end

@implementation LiquorMarketController
static NSString *CellIdentifier = @"LiquorMarketCell";
- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"圣酒市场";
    self.view.backgroundColor = BACKGROUNDCOLOR;
    self.tableView =[[UITableView alloc]initWithFrame:CGRectMake(0, kNavBarHeight+15, SCREEN_WIDTH, SCREEN_HEIGHT-kNavBarHeight-kIPhoneXBottomHeight -15) style:UITableViewStylePlain];
    
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    //[self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:CellIdentifier];
    [self.tableView registerNib:[UINib nibWithNibName:@"WalletViewCell" bundle:nil] forCellReuseIdentifier:CellIdentifier];
    [self.view addSubview:self.tableView];
    // Do any additional setup after loading the view.
}
-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
    return 40;
}
-(UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
    UIView *headView =[[UIView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 40)];
    UILabel *titleLabel =[[UILabel alloc]initWithFrame:CGRectMake(20, 0, SCREEN_WIDTH, 40)];
    
    titleLabel.text = @"出让圣酒";
    [headView addSubview:titleLabel];
    return headView;
}
    
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 10;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 110;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    WalletViewCell *cell =[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    //cell.textLabel.text = @"123";
    return cell;
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
